package ucheck
{
	[Bindable]
	public class AppData
	{
		private static var curIPAddress:String = "";
		public static function setCurrentIP(ipaddr:String):void
		{
			curIPAddress = ipaddr;
		}
		public static function getCurrentIP():String
		{
			return curIPAddress;
		}
		private static var curUserName:String = "";
		public static function setCurrentUserName(uname:String):void
		{
			curUserName = uname;
		}
		public static function getCurrentUserName():String
		{
			return curUserName;
		}
		public static function isUserAdmin():Boolean
		{
			if(curUserName=="gmcc"||curUserName.indexOf("admin")!=-1)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		public static function setCurUserCityID(cid:int):void
		{
			if(cid==-1)
			{
				cityArray = initAllCityArray();
				cityArrayWithNoSel = initAllCityArrayWithNoSel();
			}
			else
			{
				var tmpArray:Array =  initAllCityArray();
				for(var x:int=0;x<tmpArray.length;x++)
				{
					if(tmpArray[x].value == cid)
					{
						cityArray = new Array(tmpArray[x]);
						cityArrayWithNoSel = new Array({text:"（请选择）", value: 0,en:""},tmpArray[x]);
						return;
					}
				}
			}
		}
		//广东Abis###begin
		private static function initAllCityArray():Array
		{
			var retArray:Array = new Array(
				{ text:"广州", value: 2,en:"guangzhou"},
				{ text:"深圳", value: 3,en:"shenzhen"},
				{ text:"东莞", value: 12,en:"dongguan"},
				{ text:"佛山", value: 6,en:"foshan"},
				{ text:"汕头", value: 5,en:"shantou"},
				{ text:"珠海", value: 4,en:"zhuhai"},
				{ text:"中山", value: 13,en:"zhongshan"},
				{ text:"惠州", value: 10,en:"huizhou"},
				{ text:"江门", value: 14,en:"jiangmen"},
				{ text:"湛江", value: 16,en:"zhanjiang"},
				{ text:"韶关", value: 7,en:"shaoguan"},
				{ text:"河源", value: 8,en:"heyuan"},
				{ text:"梅州", value: 9,en:"meizhou"},
				{ text:"汕尾", value: 11,en:"shanwei"},
				{ text:"阳江", value: 15,en:"yangjiang"},
				{ text:"茂名", value: 17,en:"maoming"},
				{ text:"肇庆", value: 18,en:"zhaoqing"},
				{ text:"清远", value: 19,en:"qingyuan"},
				{ text:"潮州", value: 20,en:"chaozhou"},
				{ text:"揭阳", value: 21,en:"jieyang"},
				{ text:"云浮", value: 22,en:"yunfu"}
			);
			return retArray;
		}
		private static function initAllCityArrayWithNoSel():Array
		{
			var retArray:Array = new Array(
				{ text:"（请选择）", value: 0,en:""},
				{ text:"广州", value: 2,en:"guangzhou"},
				{ text:"深圳", value: 3,en:"shenzhen"},
				{ text:"东莞", value: 12,en:"dongguan"},
				{ text:"佛山", value: 6,en:"foshan"},
				{ text:"汕头", value: 5,en:"shantou"},
				{ text:"珠海", value: 4,en:"zhuhai"},
				{ text:"中山", value: 13,en:"zhongshan"},
				{ text:"惠州", value: 10,en:"huizhou"},
				{ text:"江门", value: 14,en:"jiangmen"},
				{ text:"湛江", value: 16,en:"zhanjiang"},
				{ text:"韶关", value: 7,en:"shaoguan"},
				{ text:"河源", value: 8,en:"heyuan"},
				{ text:"梅州", value: 9,en:"meizhou"},
				{ text:"汕尾", value: 11,en:"shanwei"},
				{ text:"阳江", value: 15,en:"yangjiang"},
				{ text:"茂名", value: 17,en:"maoming"},
				{ text:"肇庆", value: 18,en:"zhaoqing"},
				{ text:"清远", value: 19,en:"qingyuan"},
				{ text:"潮州", value: 20,en:"chaozhou"},
				{ text:"揭阳", value: 21,en:"jieyang"},
				{ text:"云浮", value: 22,en:"yunfu"}
			);
			return retArray;
		}
		//====###end
		public static var cityArray:Array = initAllCityArray();
		public static var cityArrayWithNoSel:Array = initAllCityArrayWithNoSel();
		// 路测数据预定义报表
		public static var dtReport:Array = new Array(
			{ text: "1_GSM语音业务报表", value: 1},
			{ text: "2_GSM语音业务报表（事件）", value: 2},
			{ text: "3_集团ATU测试三网对比报表", value: 3},
			{ text: "4_GSM数据业务报表", value: 4}
		);
		
		public function AppData()
		{
			
		}
		
	}
}